<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    /*
     * test1
     */
    function A(){

    }
    A.prototype.n = 1

    let b = new A()

    A.prototype = {
        n: 2,
        m: 3
    }
    let c = new A()
    console.log(b.n,b.m,c.n,c.m)

    /*
    test2
     */
    const F = function (){
        Object.prototype.a = function (){
            console.log('a()')
        }
    }
    Function.prototype.b = function (){
        console.log('b()')
    }
    let f = new F()
    f.a()
    f.b()
    Object.b()
    F.a()
    F.b()


</script>
</body>
</html>